A real-time clock (RTC) device is present in many electronic devices, for example personal computers, servers and embedded systems, which need to keep accurate time. The RTC device operates by dividing an oscillating signal, provided by a clock source, typically a 32.768 kHz crystal, into a clock signal of 1 Hz.
Most applications require clock accuracy of better than 5 parts per million (ppm). The factors affecting the clock accuracy include ambient temperature, ambient humidity and shock, among which the ambient temperature factor contributes most. The RTC device needs calibration due to a nature of the frequency deviation over temperature, especially when used over a wide temperature range.
Many approaches have been applied to compensate for the frequency deviation due to temperature variation. One approach is tuning the crystal to a nominal frequency by adjusting the capacitive load added to the crystal. Another approach is periodically modifying the clock frequency by subtracting or inserting clock pulses. Both approaches are based on a frequency versus temperature curve of the crystal, according to which a compensation recipe at a time or during a period is calculated using the temperature of the crystal as input.
Generally, crystals in one batch are regarded to have similar frequency performance, and it is a normal practice to measure frequency versus temperature curves of several crystals within one batch and take the average of curves as the curve of each crystal within the batch, which is loaded into a memory for calibration purpose. However, each crystal behaves differently due to manufacturing errors, for example. In addition, thermal shock during soldering can also alter a crystal's frequency.
Therefore, a custom or specific frequency-temperature curve for each crystal is essential when considering high accuracy levels or for some other purpose. To accomplish this, the supplier needs to analyze each crystal's frequency performance under several different ambient temperatures by moving all testing benches among testing rooms with different temperatures or waiting for the testing room to reach a desired ambient temperature. The manpower and time needed for such effort could be cumbersome.
It would therefore be desirable to achieve a circuit and method for generating a custom frequency-temperature curve for each crystal effectively. It would also be advantageous to achieve a circuit and method for generating a clock signal based on a custom frequency-temperature curve for each crystal.